<?php


// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');


JHtml::stylesheet("http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css");
JHtml::stylesheet(Juri::base().'templates/cashdressing/bootstrap/css/bootstrap.css');

JHtml::script("http://code.jquery.com/jquery-1.9.1.js");
JHtml::script("http://code.jquery.com/ui/1.10.3/jquery-ui.js");
JHtml::script(Juri::base().'templates/cashdressing/bootstrap/js/bootstrap.js');
?>


<?php
    $data   = $this->items;
?>
    
<table class="table table-striped" style="width:100%;">
    <tr style="text-align:center;" >
        <th>Demande</th>
        <th>Date</th>
        <th>Ref&eacute;rence</th>
        <th>Statut</th>
        <th>Nombre de produits</th>
        <th>Prix propos&eacute;</th>
    </tr>
        <?php
        foreach ($data AS $d){
            $demande    = $d->type_cashbag;
            $date       = explode(' ', $d->demandedOn);
            $ref_int    = $d->ref_interne;
            if($d->status==0)   $statut = 'Envoi en cours';
            if($d->status==1)   $statut = 'Estimation en cours';
            if($d->status==2)   $statut = 'Vente terminée';
            $nbre       = $d->number_of_product_cash;
            $estimation = $d->cashbag_estimation;
            
            echo'<tr><td>'.$demande.'</td><td>'.$date[0].'</td><td>'.$ref_int.'</td><td>'.$statut.'</td><td>'.$nbre.'</td><td>'.$estimation.'</td></tr>';
        }
        ?>
       
</table>


